<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>壁纸APP - 我的</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-color: #007AFF;
            --bg-color: #f5f5f5;
            --text-color: #333;
            --card-bg: #fff;
            --border-color: #f5f5f5;
            --secondary-text: #999;
            --shadow-color: rgba(0,0,0,0.1);
            --highlight-color: #f0f7ff;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            transition: all 0.3s ease;
        }
        
        body.dark-theme {
            --primary-color: #3a9bff;
            --bg-color: #121212;
            --text-color: #f5f5f5;
            --card-bg: #1e1e1e;
            --border-color: #2c2c2c;
            --secondary-text: #aaa;
            --shadow-color: rgba(0,0,0,0.3);
            --highlight-color: #1a2c42;
        }

        /* 顶部标题栏 */
        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 44px;
            background: var(--card-bg);
            padding: 8px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 1px 3px var(--shadow-color);
            z-index: 100;
            transition: background-color 0.3s ease;
        }

        .header h1 {
            font-size: 18px;
            font-weight: 500;
        }
        
        .theme-toggle {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-color);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .theme-toggle:active {
            background-color: var(--highlight-color);
            transform: scale(0.95);
        }

        /* 用户中心内容区 */
        .profile-content {
            margin-top: 44px;
            margin-bottom: 49px;
            overflow-y: auto;
            padding-bottom: 20px;
        }

        /* 用户中心顶部信息 */
        .profile-header {
            background: var(--card-bg);
            padding: 20px 16px;
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            border-radius: 0 0 16px 16px;
            box-shadow: 0 2px 8px var(--shadow-color);
            position: relative;
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
        }

        .profile-avatar {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: var(--primary-color);
            margin-right: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 24px;
            overflow: hidden;
            position: relative;
            border: 2px solid #fff;
            box-shadow: 0 2px 10px var(--shadow-color);
            transition: transform 0.3s ease;
        }
        
        .profile-avatar:hover {
            transform: scale(1.05);
        }
        
        .avatar-edit {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 24px;
            height: 24px;
            background: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            cursor: pointer;
            border: 2px solid white;
            box-shadow: 0 2px 5px var(--shadow-color);
        }

        .profile-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .profile-info {
            flex: 1;
        }

        .profile-name {
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
        }
        
        .profile-name .edit-icon {
            margin-left: 8px;
            font-size: 14px;
            color: var(--primary-color);
            cursor: pointer;
        }

        .profile-id {
            font-size: 14px;
            color: var(--secondary-text);
            margin-bottom: 8px;
        }
        
        .profile-level {
            display: inline-block;
            background-color: var(--primary-color);
            color: white;
            font-size: 12px;
            padding: 2px 8px;
            border-radius: 10px;
        }

        /* 数据统计卡片 */
        .stats-container {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            padding: 0 16px;
            margin-bottom: 16px;
        }
        
        .stat-card {
            background: var(--card-bg);
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            box-shadow: 0 2px 8px var(--shadow-color);
            transition: transform 0.3s ease, background-color 0.3s ease;
        }
        
        .stat-card:hover {
            transform: translateY(-3px);
        }
        
        .stat-value {
            font-size: 20px;
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 4px;
        }
        
        .stat-label {
            font-size: 12px;
            color: var(--secondary-text);
        }
        
        /* 功能区块 */
        .section {
            background: var(--card-bg);
            margin-bottom: 12px;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px var(--shadow-color);
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
        }

        .section-title {
            padding: 12px 16px;
            font-size: 14px;
            color: var(--secondary-text);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .section-title .more {
            font-size: 12px;
            color: var(--primary-color);
            cursor: pointer;
        }

        .menu-list {
            padding: 0 16px;
        }
        
        /* 最近浏览记录 */
        .recent-view-list {
            display: flex;
            overflow-x: auto;
            padding: 12px 16px;
            gap: 12px;
            scrollbar-width: none; /* Firefox */
        }
        
        .recent-view-list::-webkit-scrollbar {
            display: none; /* Chrome, Safari, Edge */
        }
        
        .recent-item {
            flex: 0 0 auto;
            width: 120px;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 2px 6px var(--shadow-color);
            transition: transform 0.3s ease;
        }
        
        .recent-item:hover {
            transform: scale(1.05);
        }
        
        .recent-item img {
            width: 100%;
            height: 160px;
            object-fit: cover;
        }
        
        .recent-item-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 8px;
            background: linear-gradient(transparent, rgba(0,0,0,0.7));
            color: white;
            font-size: 12px;
        }

        .menu-item {
            padding: 16px 0;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 16px;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }
        
        .menu-item:hover {
            background-color: var(--highlight-color);
        }

        .menu-item:last-child {
            border-bottom: none;
        }

        .menu-item .right {
            color: var(--secondary-text);
            font-size: 14px;
            display: flex;
            align-items: center;
        }
        
        .menu-item .right i {
            margin-left: 4px;
        }

        .menu-item .icon {
            margin-right: 12px;
            color: var(--primary-color);
            width: 20px;
            text-align: center;
            transition: transform 0.2s ease;
        }
        
        .menu-item:hover .icon {
            transform: scale(1.1);
        }

        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 49px;
            background: var(--card-bg);
            display: flex;
            justify-content: space-around;
            align-items: center;
            box-shadow: 0 -1px 3px var(--shadow-color);
            transition: background-color 0.3s ease;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--secondary-text);
            font-size: 12px;
            text-decoration: none;
            padding: 8px 0;
            width: 33.33%;
            transition: color 0.3s ease, transform 0.2s ease;
        }

        .nav-item.active {
            color: var(--primary-color);
        }
        
        .nav-item:active {
            transform: scale(0.95);
        }
        
        .nav-icon {
            font-size: 18px;
            margin-bottom: 4px;
        }
        
        /* 动画效果 */
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        .pulse {
            animation: pulse 1.5s infinite;
        }
    </style>
</head>
<body>
    <!-- 顶部标题栏 -->
    <div class="header">
        <div></div> <!-- 占位元素，保持标题居中 -->
        <h1>我的</h1>
        <div class="theme-toggle" id="themeToggle">
            <i class="fas fa-moon"></i>
        </div>
    </div>

    <!-- 用户中心内容 -->
    <div class="profile-content">
        <!-- 顶部用户信息 -->
        <div class="profile-header">
            <div class="profile-avatar">
                <img src="https://picsum.photos/200/200" alt="用户头像">
                <div class="avatar-edit">
                    <i class="fas fa-camera"></i>
                </div>
            </div>
            <div class="profile-info">
                <div class="profile-name">用户昵称 <i class="fas fa-edit edit-icon"></i></div>
                <div class="profile-id">ID: 888888</div>
                <div class="profile-level">Lv.6 壁纸达人</div>
            </div>
        </div>
        
        <!-- 数据统计卡片 -->
        <div class="stats-container">
            <div class="stat-card">
                <div class="stat-value">128</div>
                <div class="stat-label">活跃天数</div>
            </div>
            <div class="stat-card">
                <div class="stat-value">56</div>
                <div class="stat-label">壁纸收藏</div>
            </div>
            <div class="stat-card">
                <div class="stat-value">32</div>
                <div class="stat-label">成就点数</div>
            </div>
        </div>
        
        <!-- 最近浏览 -->
        <div class="section">
            <div class="section-title">
                <span>最近浏览</span>
                <span class="more">查看全部</span>
            </div>
            <div class="recent-view-list">
                <div class="recent-item">
                    <img src="https://picsum.photos/300/500?random=1" alt="最近浏览壁纸">
                    <div class="recent-item-info">今日热门</div>
                </div>
                <div class="recent-item">
                    <img src="https://picsum.photos/300/500?random=2" alt="最近浏览壁纸">
                    <div class="recent-item-info">自然风光</div>
                </div>
                <div class="recent-item">
                    <img src="https://picsum.photos/300/500?random=3" alt="最近浏览壁纸">
                    <div class="recent-item-info">城市夜景</div>
                </div>
                <div class="recent-item">
                    <img src="https://picsum.photos/300/500?random=4" alt="最近浏览壁纸">
                    <div class="recent-item-info">动漫人物</div>
                </div>
            </div>
        </div>

        <!-- 我的收藏 -->
        <div class="section">
            <div class="section-title">
                <span>我的收藏</span>
                <span class="more">管理</span>
            </div>
            <div class="menu-list">
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-heart"></i></span>收藏的壁纸</span>
                    <span class="right">12张 <i class="fas fa-chevron-right"></i></span>
                </div>
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-star"></i></span>喜欢的壁纸</span>
                    <span class="right">8张 <i class="fas fa-chevron-right"></i></span>
                </div>
            </div>
        </div>

        <!-- 我的下载 -->
        <div class="section">
            <div class="section-title">
                <span>我的下载</span>
                <span class="more">管理</span>
            </div>
            <div class="menu-list">
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-download"></i></span>已下载壁纸</span>
                    <span class="right">24张 <i class="fas fa-chevron-right"></i></span>
                </div>
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-mobile-alt"></i></span>设为壁纸</span>
                    <span class="right">3张 <i class="fas fa-chevron-right"></i></span>
                </div>
            </div>
        </div>

        <!-- 设置 -->
        <div class="section">
            <div class="section-title">
                <span>设置</span>
                <span class="more">更多</span>
            </div>
            <div class="menu-list">
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-cog"></i></span>通用设置</span>
                    <span class="right"><i class="fas fa-chevron-right"></i></span>
                </div>
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-bell"></i></span>消息通知</span>
                    <span class="right"><i class="fas fa-chevron-right"></i></span>
                </div>
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-lock"></i></span>隐私设置</span>
                    <span class="right"><i class="fas fa-chevron-right"></i></span>
                </div>
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-file-alt"></i></span>用户协议</span>
                    <span class="right"><i class="fas fa-chevron-right"></i></span>
                </div>
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-headset"></i></span>联系我们</span>
                    <span class="right"><i class="fas fa-chevron-right"></i></span>
                </div>
                <div class="menu-item">
                    <span><span class="icon"><i class="fas fa-info-circle"></i></span>关于我们</span>
                    <span class="right">v1.0.0</span>
                </div>
            </div>
        </div>
    </div>

    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="index.html" class="nav-item" id="home-tab">
            <span class="nav-icon"><i class="fas fa-home"></i></span>
            <span>首页</span>
        </a>
        <a href="category.html" class="nav-item" id="category-tab">
            <span class="nav-icon"><i class="fas fa-th-large"></i></span>
            <span>分类</span>
        </a>
        <a href="profile.html" class="nav-item active" id="profile-tab">
            <span class="nav-icon"><i class="fas fa-user"></i></span>
            <span>我的</span>
        </a>
    </div>
    
    <script>
        // 主题切换功能
        const themeToggle = document.getElementById('themeToggle');
        const body = document.body;
        
        // 检查本地存储中的主题设置
        if (localStorage.getItem('darkTheme') === 'true') {
            body.classList.add('dark-theme');
            themeToggle.innerHTML = '<i class="fas fa-sun"></i>';
        }
        
        // 主题切换事件
        themeToggle.addEventListener('click', function() {
            body.classList.toggle('dark-theme');
            
            if (body.classList.contains('dark-theme')) {
                localStorage.setItem('darkTheme', 'true');
                themeToggle.innerHTML = '<i class="fas fa-sun"></i>';
            } else {
                localStorage.setItem('darkTheme', 'false');
                themeToggle.innerHTML = '<i class="fas fa-moon"></i>';
            }
        });
        
        // 菜单项点击效果
        const menuItems = document.querySelectorAll('.menu-item');
        menuItems.forEach(item => {
            item.addEventListener('click', function() {
                // 添加点击波纹效果
                this.style.backgroundColor = 'var(--highlight-color)';
                setTimeout(() => {
                    this.style.backgroundColor = '';
                }, 300);
            });
        });
        
        // 头像编辑功能
        const avatarEdit = document.querySelector('.avatar-edit');
        avatarEdit.addEventListener('click', function() {
            alert('头像编辑功能即将上线！');
        });
        
        // 昵称编辑功能
        const editIcon = document.querySelector('.edit-icon');
        editIcon.addEventListener('click', function() {
            const profileName = document.querySelector('.profile-name');
            const currentName = profileName.textContent.trim().replace(' ', '');
            const newName = prompt('请输入新的昵称', currentName);
            
            if (newName && newName.trim() !== '') {
                profileName.innerHTML = newName + ' <i class="fas fa-edit edit-icon"></i>';
                // 重新绑定事件
                document.querySelector('.edit-icon').addEventListener('click', arguments.callee);
            }
        });
        
        // 为"更多"按钮添加点击事件
        const moreButtons = document.querySelectorAll('.more');
        moreButtons.forEach(button => {
            button.addEventListener('click', function(e) {
                e.stopPropagation(); // 阻止事件冒泡
                alert('更多功能即将上线！');
            });
        });
    </script>
</body>
</html>